-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor Module Structure to Align with Upstream Layout #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the module structure to better align with the upstream OpenTelemetry Java Instrumentation project layout. The changes reorganize instrumentation modules into javaagent/ subdirectories and move custom library modules from custom/ to a dedicated libs/ directory, creating a cleaner separation between configurations/extensions and reusable library code.
Changes:
- Reorganized instrumentation modules to follow upstream's
javaagent/subdirectory pattern (e.g.,instrumentation/jdbc/→instrumentation/jdbc/javaagent/) - Migrated library modules from
custom:lambdaandcustom:sharedtolibs:lambdaandlibs:shared - Updated Testcontainers from
1.19.8/1.20.4/2.0.2to2.0.3with BOM-based dependency management - Removed verbose test container loggers from smoke tests
- Updated CI/CD workflows to reference new module paths and removed Docker build caching configuration
Reviewed changes
Copilot reviewed 25 out of 163 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Updated module paths to reflect new libs/ directory and javaagent/ subdirectory structure |
| agent/build.gradle.kts | Updated dependency references to use libs:shared instead of custom:shared |
| agent-lambda/build.gradle.kts | Updated dependency references to use libs:lambda and libs:shared |
| custom/build.gradle.kts | Updated dependency references to use libs:shared |
| libs/shared/build.gradle.kts | Added solarwinds.java-conventions plugin to relocated library module |
| libs/lambda/build.gradle.kts | Added solarwinds.java-conventions plugin and updated dependency references |
| bootstrap/build.gradle.kts | Added solarwinds.java-conventions plugin for Java toolchain configuration |
| instrumentation/build.gradle.kts | Added solarwinds.java-conventions plugin |
| testing/agent-for-testing/build.gradle.kts | Added solarwinds.java-conventions plugin and updated to reference libs:shared |
| testing/agent-test-extension/build.gradle.kts | Updated dependency reference to use libs:shared |
| buildSrc/src/main/kotlin/solarwinds.java-conventions.gradle.kts | Added solarwinds.spotless-conventions plugin |
| buildSrc/src/main/kotlin/solarwinds.instrumentation-conventions.gradle.kts | Enhanced to support javaagent/ subdirectory naming pattern with computeInstrumentationName() function |
| instrumentation/jdbc/javaagent/build.gradle.kts | Updated Testcontainers to 2.0.3, updated MySQL connector, and added compiler configuration to remove -Werror |
| instrumentation/jdbc/javaagent/src/test/java/.../JdbcInstrumentationTest.java | Added DockerImageName.parse() for MySQL container initialization and @SuppressWarnings("all") annotation |
| benchmark/build.gradle.kts | Migrated to Testcontainers BOM 2.0.3 |
| smoke-tests/build.gradle | Updated Testcontainers version to 2.0.3 |
| smoke-tests/src/test/java/.../SpringBootWebMvcContainer.java | Removed verbose log consumer |
| smoke-tests/src/test/java/.../K6Container.java | Removed verbose log consumer and logger field |
| smoke-tests/src/test/java/.../SmokeTest.java | Removed verbose log consumer |
| smoke-tests/src/test/java/.../SmokeTestV2.java | Removed verbose log consumer |
| smoke-tests/src/test/java/.../LambdaTest.java | Removed verbose log consumer |
| .github/workflows/push.yml | Updated S3 upload paths to reference libs/shared and removed Docker build caching |
| .github/workflows/release.yml | Updated S3 upload paths to reference libs/shared |
| .circleci/config.yml | Updated file paths to reference libs/shared |
| .github/copilot-instructions.md | Updated module structure documentation to reflect new libs/ directory |
Summary
This PR refactors the project's module structure to better align with the upstream OpenTelemetry Java Instrumentation project layout. The changes reorganize instrumentation modules, move custom library modules to a dedicated
libs/directory, and streamline CI/CD workflows.Changes
🏗️ Module Structure Refactoring
Instrumentation Modules Reorganization
javaagent/subdirectory pattern:instrumentation/jdbc/→instrumentation/jdbc/javaagent/instrumentation/spring-webmvc/spring-webmvc-3.1/→instrumentation/spring-webmvc/spring-webmvc-3.1/javaagent/instrumentation/spring-webmvc/spring-webmvc-6/→instrumentation/spring-webmvc/spring-webmvc-6/javaagent/instrumentation/hibernate/hibernate-4.0/→instrumentation/hibernate/hibernate-4.0/javaagent/instrumentation/hibernate/hibernate-6.0/→instrumentation/hibernate/hibernate-6.0/javaagent/Library Modules Migration
custom:lambda→libs:lambdacustom:shared→libs:sharedThis creates a cleaner separation between:
custom/- Custom SolarWinds configurations and extensionslibs/- Reusable library modules (shared code between agent and agent-lambda)📦 Dependency Updates
1.19.8to2.0.3using BOM-based dependency managementbenchmark/build.gradle.kts: Switched totestcontainers-bom:2.0.3smoke-tests/build.gradle: Updated testcontainers version🔧 Build Configuration Updates
settings.gradle.ktswith new module pathsagent/build.gradle.ktsagent-lambda/build.gradle.ktscustom/build.gradle.ktstesting/agent-for-testing/build.gradle.ktstesting/agent-test-extension/build.gradle.ktsbootstrap/build.gradle.ktssolarwinds.instrumentation-conventions.gradle.ktswith additional configuration🧹 CI/CD Cleanup
GitHub Actions Workflow (
push.yml)libs/sharedlocation for S3 uploadscache-from/cache-tofor GHA cache)CircleCI & Release Workflow
.circleci/config.ymlwith corrected module references.github/workflows/release.ymlwith new module paths.github/copilot-instructions.mdto reflect new module structure🧪 Test Cleanup
LambdaTest.javaSmokeTest.javaSmokeTestV2.javaK6Container.javaSpringBootWebMvcContainer.javaFiles Changed
Breaking Changes
custom:lambdalibs:lambdacustom:sharedlibs:sharedinstrumentation:jdbcinstrumentation:jdbc:javaagentinstrumentation:spring-webmvc:spring-webmvc-3.1instrumentation:spring-webmvc:spring-webmvc-3.1:javaagentinstrumentation:spring-webmvc:spring-webmvc-6instrumentation:spring-webmvc:spring-webmvc-6:javaagentinstrumentation:hibernate:hibernate-4.0instrumentation:hibernate:hibernate-4.0:javaagentinstrumentation:hibernate:hibernate-6.0instrumentation:hibernate:hibernate-6.0:javaagentTesting
Test services data